package zwp.example.demo1;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class Demo8String {

    @Test
    public void test1(){
        String str = new String("ceshi");
        int i = str.indexOf("c");
        int i1 = str.indexOf("i");
        System.out.println(i);
        System.out.println(i1);
        String substring = str.substring(0,5);
        System.out.println(substring);
        System.out.println(str.replace("s","S"));
    }
}
